<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <style>
       
       
       .video_share video{
           width:100%;
           height:200px;
       }
        .cl_detail{
            border-top:2px solid #ddd;
        }
        h6{
            color:#999;
        }
        .v_download_btn{
            display: block;
            width:200px;
            height:30px;
            border:0;
            background: #fed847;
            margin:0 auto;
            border-radius: 20px;
            letter-spacing: 3px;
        }
        .cl_detail p{
            margin-top:50px;
        }
    </style>
</head>

<body>
    <div class="video_share">
        
    </div>
    <div class="video_detail">
        <h4 class="video_title"></h4>
        <h6 ><span class="video_mount"></span>人学习</h6>
       
    </div>
    <div class="cl_detail">
        <h4>课程详情</h4>
        <div class="cl_detail_img">
            
        </div>
        <p>评论</p>
        <button class="v_download_btn">下载APP</button>
    </div>
    <input type="hidden" id="video_id" value="${id}">
</body>
<script src="../../js/jquery.js"></script>
<script>
    $(function(){
        var video_id=$('#video_id').val();
        var video_token=$('#video_token').val();
        $.ajax({
            type:'post',
            url:'http://app.scjapp.com:8088/cuotigou/knowledge/study',
            data:{
                id:video_id
            }
        })
        $.ajax({
            type:'post',
            url:'http://app.scjapp.com:8088/cuotigou/knowledge/detail',
            data:{
                id:video_id
            },
            success:function(data){
                console.log(data.data.detail);
                var det=data.data.detail;
                $('.video_share').append(
                    '<video src="'+det.videoUrl+'" controls="controls" poster="'+det.image+'"></video>'
                );
                $('.video_title').html(det.title);
                $('.video_mount').html(det.count);
                $('.cl_detail_img').html(det.content);
              
              
            }
        })
    })


$(function () {
    var browser = {
        versions: function () {
            var u = navigator.userAgent,
                app = navigator.appVersion;
            return { //移动终端浏览器版本信息
                ios: !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/), //ios终端
                android: u.indexOf('Android') > -1 || u.indexOf('Linux') > -1, //android终端或uc浏览器
                iPhone: u.indexOf('iPhone') > -1, //是否为iPhone或者QQHD浏览器
                iPad: u.indexOf('iPad') > -1, //是否iPad
            };
        }(),
    }
    if (browser.versions.iPhone || browser.versions.iPad || browser.versions.ios) {
        alert('ios版本未上架');
    }
    if (browser.versions.android) {
        $('.v_download_btn').click(function () {
            window.location.href = "http://app.scjapp.com:8088/apk/cuotigou.apk";
        })
    }

})


</script>
</html>